// packageB/components/usually_block/pfep/pfep.js
const mybehavior = require("../../../../behaviors/requests")
Component({
  /**
   * 组件的属性列表
   */
  behaviors: [mybehavior],
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    select_style: "width: 136rpx;height: 48rpx;background: #5555FF;border-radius: 24rpx 24rpx 24rpx 24rpx;opacity: 1;position: absolute;top: 108rpx;left: 28rpx;",
    tag_style1: "position: absolute;top: 114rpx;left: 48rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color:white;",
    tag_style2: "position: absolute;top: 114rpx;left: 196rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
    tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
    tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 120rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
    show11: true,
    show22: false,
    show33: false,
    show44: false,
    show55: false,
    baseUrl: "https://logisticsengineering.gree.com/container_manage_api/container_manage",
    total_task_count: 0,
    lailiao_task_count: 0,
    pssx_task_count: 0,
    WL_show: true,
    WL_word: "物流环节"
  },
  attached: function () {
    // this.getSelfData()
    this.getDataList1()

  },
  /**
   * 组件的方法列表
   */
  methods: {
    changeWL() {
      this.setData({
        WL_show: false,
        WL_word: "返回上级"

      })
    },

    routeJump(e) {
      this.checkAuth(e)

    },
    // 标签切换
    tagChange1() {

      this.setData({
        show11: true,
        show22: false,
        show33: false,
        show44: false,
        WL_show: true,
        WL_word: "物流环节",
        tag_style1: "position: absolute;top: 114rpx;left: 48rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color:white;",
        tag_style2: "position: absolute;top: 114rpx;left: 196rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 120rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        select_style: "width: 136rpx;height: 48rpx;background: #5555FF;border-radius: 24rpx 24rpx 24rpx 24rpx;opacity: 1;position: absolute;top: 108rpx;left: 28rpx;",
      })
    },
    tagChange2() {
      this.setData({
        show11: false,
        show22: true,
        show33: false,
        show44: false,
        tag_style1: "position: absolute;top: 114rpx;left: 48rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color: #666666;;",
        tag_style2: "position: absolute;top: 114rpx;left: 196rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color:white;",
        tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 120rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        select_style: "width: 136rpx;height: 48rpx;background: #5555FF;border-radius: 24rpx 24rpx 24rpx 24rpx;opacity: 1;position: absolute;top: 108rpx;left: 176rpx;",

      })
    },
    tagChange3() {
      this.setData({
        show11: false,
        show22: false,
        show33: true,
        show44: false,
        tag_style1: "position: absolute;top: 114rpx;left: 48rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style2: "position: absolute;top: 114rpx;left: 196rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color:white;",
        tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 120rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        select_style: "width: 136rpx;height: 48rpx;background: #5555FF;border-radius: 24rpx 24rpx 24rpx 24rpx;opacity: 1;position: absolute;top: 108rpx;left: 324rpx;",
      })
    },
    tagChange4() {
      this.setData({
        show11: false,
        show22: false,
        show33: false,
        show44: true,
        tag_style1: "position: absolute;top: 114rpx;left: 48rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style2: "position: absolute;top: 114rpx;left: 196rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style3: "position: absolute;top: 114rpx;left: 344rpx;width: 96rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;",
        tag_style4: "position: absolute;top: 114rpx;left: 492rpx;width: 120rpx;height: 36rpx;font-size: 24rpx;font-weight: 600;color: #666666;line-height: 36rpx;color:white;",
        select_style: "width: 160rpx;height: 48rpx;background: #5555FF;border-radius: 24rpx 24rpx 24rpx 24rpx;opacity: 1;position: absolute;top: 108rpx;left: 472rpx;",
      })
    },
    // 待办数据 
    getDataList1() {
      let url = "https://logisticsengineering.gree.com/pfep2_api/personal_task_manage/query_current_total_task"
      let data = {
        page_size: 9999,
        page: 1,
        query_cond: {}
      }
      this.post(url, data).then(res => {
        if (res.code == 20000) {



          this.setData({
            total_task_count: res.data.total,



          })
          // console.log("x", self.data.current_status1, self.data.current_status2, self.data.current_btn,);


        } else {
          // wx.showToast({
          //   title: res.msg,
          //   icon: "error"
          // })

        }
      }).catch(err => {

        // wx.showToast({
        //   title: err.msg,
        //   icon: 'error'
        // })
      })
    },
  }
})
